#if defined(GENERIC) || !defined(G_MEMBLOCK_H)
#define G_MEMBLOCK_H

/*
 ******************************
 * Object Oriented Programming in C
 *
 * Author: Laurent Deniau, Laurent.Deniau@cern.ch
 *
 * For more information, please see the paper:
 * http://home.cern.ch/ldeniau/html/oopc/oopc.html
 *
 ******************************
 */

#include <ooc.h>

/*--------------------------------*/
/*   Generic memBlock interface   */
/*        [abstract class]        */
/*--------------------------------*/

#undef  OBJECT
#define OBJECT GENERIC(memBlock)

/* Object interface */
BASEOBJECT_INTERFACE

  void   *private(owner);
  gType1 *private(base);

BASEOBJECT_METHODS

  void method_(set) size_t n, gType1 x __;
  void method_(copy) size_t n, gType1 const* t __;
  void method_(resize) size_t n __;

ENDOF_INTERFACE

/* Abstract Class interface */
ABSTRACTCLASS_INTERFACE

  int private(total);

  int classMethod (numBlock);   

  void method_(init) size_t n __;
  void method_(initRef) gType1 *const t __;

  gType1 const* constMethod(const_base);
  gType1 * method(base);

ENDOF_INTERFACE

#endif
